<nav class="navbar navbar-default navbar-fixed-top" style="margin-bottom: 0">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="{:url('/index/index')}">小资讯</b></a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav">

                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">资讯 <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <?php foreach($infocate as $item){?>
                        <li><a href="{:url('/index/article/index/cid/'.$item['cat_id'])}"><?php echo $item['cat_title']?></a></li>
                        <?php } ?>
                    </ul>
                </li>
                <li><a href="{:url('/index/dynamic/index')}">会员动态</a></li>
                <li><a href="#">联系我们</a></li>
            </ul>
            <ul class="nav navbar-nav pull-right">

                <!--<li class="search-area"><a href="#about">搜索</a></li>-->
                <?php if(Cookie::has('phone')){?>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle face-area" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><img
                            src="<?php echo config('upload.imgurl').$userface;?>" class="face-img" alt="头像"> <span class="caret"></span></a>
                    <ul class="dropdown-menu min-menu">
                        <li><a href="{:url('/index/user/index')}">个人中心</a></li>
                        <li><a href="#">互动消息</a></li>
                        <li><a href="#">系统通知</a></li>
                        <li><a href="{:url('/index/login/logout')}">退出登录</a></li>
                    </ul>
                </li>
                <?php }else{ ?>
                <li><a href="#" data-toggle="modal" data-target="#loginmodal">登录</a></li>
                <li><a href="#" data-toggle="modal" data-target="#regmodal">注册</a></li>
                <?php } ?>
                <li><a href="#contact">投稿 </a></li>
            </ul>
        </div><!--/.nav-collapse -->
    </div>
</nav>
